load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test", "rust_test_suite")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/temp_crypto",
    "//rs/crypto/tls_interfaces",
    "//rs/interfaces",
    "//rs/interfaces/registry",
]

MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/interfaces/sig_verification",
    "//rs/crypto/test_utils",
    "//rs/crypto/test_utils/reproducible_rng",
    "//rs/registry/fake",
    "//rs/registry/proto_data_provider",
    "//rs/types/types",
]

MACRO_DEV_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "for_verification_only",
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "ic_crypto_for_verification_only",
    proc_macro_deps = MACRO_DEPENDENCIES,
    deps = DEPENDENCIES,
)

rust_test(
    name = "verification_test",
    aliases = ALIASES,
    crate = ":for_verification_only",
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)

rust_test_suite(
    name = "for_verification_only_integration",
    srcs = glob(["tests/**/*.rs"]),
    aliases = ALIASES,
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = [":for_verification_only"] + DEPENDENCIES + DEV_DEPENDENCIES,
)
